from django.conf.urls.defaults import *


govtrack_index = url(
    regex  = '^$',
    view   = 'opengov.govtrack.views.govtrack_index',
    name   = 'vwgovtrackindex'
)

govtrack_komdir_index = url(
    regex  = '^dir/$',
    view   = 'opengov.govtrack.views.govtrack_komdir_index',
    name   = 'vwgovtrackkomdirindex'
)

govtrack_komdir_single = url(
    regex  = '^dir/(?P<dir_nr>\d\d\d\d:\d+)/$',
    view   = 'opengov.govtrack.views.govtrack_komdir_single',
    name   = 'vwgovtrackkomdirsingle'
)

govtrack_komdir_ical = url(
    regex  = '^dir/(?P<dir_nr>\d\d\d\d:\d+).ics$',
    view   = 'opengov.govtrack.views.govtrack_komdir_ical',
    name   = 'vwgovtrackkomdirical'
)

govtrack_sfs_single = url(
    regex  = '^sfs/(?P<sfsnummer>\d\d\d\d:\d+)/$',
    view   = 'opengov.govtrack.views.govtrack_sfs_single',
    name   = 'vwgovtracksfssingle'
)

govtrack_prop_single = url(
    regex  = '^prop/(?P<nummer>\d\d\d\d\/\d\d:\d+)/$',
    view   = 'opengov.govtrack.views.govtrack_prop_single',
    name   = 'vwgovtrackpropsingle'
)

govtrack_utredning_single = url(
    regex  = '^utredning/(?P<departementskod>\w\w?)/(?P<nummer>\d\d\d\d:\w+)/$',
    view   = 'opengov.govtrack.views.govtrack_utredning_single',
    name   = 'vwgovtrackutredningsingle'
)

govtrack_utredning_ical = url(
    regex  = '^utredning/(?P<departementskod>\w\w?)/(?P<nummer>\d\d\d\d:\w+).ics$',
    view   = 'opengov.govtrack.views.govtrack_utredning_ical',
    name   = 'vwgovtrackutredningical'
)

govtrack_utredning_index = url(
    regex  = '^utredning/$',
    view   = 'opengov.govtrack.views.govtrack_utredning_index',
    name   = 'vwgovtrackutredningsingle'
)

govtrack_departement_single = url(
    regex  = '^dep/(?P<sou_slug>[a-zA-Z0-9_.-]+)/$',
    view   = 'opengov.govtrack.views.govtrack_departement_single',
    name   = 'vwgovtrackdepartementsingle'
)

govtrack_celex_single = url(
    regex  = '^celex/(?P<celexnummer>3\d+L\d+)/$',
    view   = 'opengov.govtrack.views.govtrack_celex_single',
    name   = 'vwgovtrackcelexsingle'
)


# Feeds
# Komdir
govtrack_komdir_feed = url(
    regex  = '^dir/feed/$',
    view   = 'opengov.govtrack.views.govtrack_komdir_feed',
    name   = 'vwgovtrackkomdirfeed'
)

govtrack_sfs_feed = url(
    regex  = '^sfs/feed/(?P<sfsnummer>\d\d\d\d:\d+)/$',
    view   = 'opengov.govtrack.views.govtrack_sfs_feed',
    name   = 'vwgovtracksfsfeed'
)



urlpatterns = patterns('', govtrack_index, govtrack_komdir_index, govtrack_komdir_single, govtrack_komdir_ical, govtrack_sfs_single, govtrack_prop_single, govtrack_departement_single,govtrack_utredning_single , govtrack_utredning_index, govtrack_utredning_ical, govtrack_komdir_feed, govtrack_sfs_feed, govtrack_celex_single)
